﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Dynamic_UI_Framework
{
    public static class UIContext
    {
        public static void RaiseVisualModified(IVisual v)
        {
            var handle = VisualModified;
            if (handle != null)
                handle(v, null);
        }
        public static event EventHandler VisualModified;

        private static IVisual designerVisual;
        public static IVisual DesignerVisual
        {
            get { return designerVisual; }
            set
            {
                if (value == designerVisual)
                    return;
                designerVisual = value;
                var handle = DesignerVisualChanged;
                if (handle != null)
                    handle(designerVisual, null);
            }
        }

        public static event EventHandler DesignerVisualChanged;

    }
}
